/**
 * Copyright (c) 2018-2019 PoleStar Studio. All Rights Reserved. <br>
 * Use is subject to license terms.<br>
 * <p>
 * 在此处填写文件说明
 */
package edu.javaee.spring.zdemo.life;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 填写功能简述.
 * <p>填写详细说明.<br>
 * @version v1.0
 * @author lianzuozheng
 * @date 2019-03-21 -18:00 
 */
public class Test {

    public static void main(String[] args) {
        /** 指定Spring配置文件路径  */  
        String xmlPath= "edu/javaee/spring/zdemo/life/beans.xml";
        /** 创建Spring容器  */  
        //ApplicationContext ac = new ClassPathXmlApplicationContext(xmlPath);
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(xmlPath);
        System.out.println("10.spring ioc cache pool");
        /** 从容器中获取bean  */  
        Bean bean = (Bean) ac.getBean("bean");

        /** 使用bean  */
        System.out.println(bean.toString());
        /** 关闭容器  */
        ac.close();

    }

}
